package com.xinlianshiye.im.utils.urlgoods;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Getter
@Setter
@Component
@ConfigurationProperties(value = "im")
public class UrlGoodsProperties {

    private Map<String, GoodsUrlConfig> domainGoodsUrlConfig = new HashMap<>();

    @Setter
    @Getter
    public static class GoodsUrlConfig {
        private List<GoodsUrl> details;
        private String imageDomain;
    }

    @Setter
    @Getter
    public static class GoodsUrl {
        private String prefix;
        private String url;
    }
}
